package com.emapp.lccode.db

import androidx.room.Dao
import androidx.room.Query
import com.emapp.lccode.bean.UserKt

@Dao
abstract class UserDao : BaseDao<UserKt>() {
    @Query("SELECT * FROM USERS ")
    abstract fun find(): List<UserKt>
    @Query("SELECT * FROM USERS WHERE did = :cid AND `key` = :key")
    abstract fun find(cid: Long, key: String?): UserKt?
    @Query("SELECT * FROM USERS WHERE did = :cid AND name = :vodName")
    abstract fun findByName(cid: Long, vodName: String?): List<UserKt?>?
    @Query("DELETE FROM USERS WHERE did = :cid AND `key` = :key")
    abstract fun delete(cid: Long, key: String?)
    @Query("DELETE FROM USERS WHERE did = :cid")
    abstract fun delete(cid: Long)
    @Query("DELETE FROM USERS")
    abstract fun delete()
}